|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.DSS.EventList
Class for scheduled event list.
Note that although threads have priorities, events do not, because there is
no sense of priority among external events. Rather, event handlers (threads)
have priority, mainly exerted through contention for
Resource
's, e.g., CPUs.
Constructor Summary | |
EventList()
Void constructor. |
Method Summary | |
EventNotice |
dequeue()
Dequeue the next event notice, in time then FIFO order. |
EventNotice |
dequeue(java.lang.String choiceMode)
Dequeue the next EventNotice ,
with randomization of selection if there is
more than one EventNotice at the
next scheduled time. |
void |
enqueue(EventNotice eventNotice)
Enqueue the given EventNotice . |
EventNotice |
get(int i)
Return the i-th EventNotice on this
EventList . |
boolean |
isEmpty()
Test whether this EventList is empty. |
boolean |
remove(EventNotice eventNotice)
Remove the given EventNotice |
boolean |
scheduled(RealtimeThread thread)
Tests whether the given RealTimeThread
is currently scheduled, i.e., has an
EventNotice on this
EventList . |
int |
size()
Return the number of EventNotice 's
on this EventList . |
EventNotice |
threadNextEvent(RealtimeThread thread)
Remove the first EventNotice on this
EventList referring to the given
RealTimeThread . |
java.lang.String |
toString()
Returns a string representation of this EventList |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public EventList()
Method Detail |
public void enqueue(EventNotice eventNotice)
EventNotice
.
eventNotice
- the EventNotice
to enqueue.public EventNotice dequeue()
public EventNotice dequeue(java.lang.String choiceMode)
EventNotice
,
with randomization of selection if there is
more than one EventNotice
at the
next scheduled time.
choiceMode
- If equal to:
public boolean remove(EventNotice eventNotice)
EventNotice
eventNotice
- the EventNotice
to be removed
EventNotice
was removedpublic boolean isEmpty()
EventList
is empty.
public int size()
EventNotice
's
on this EventList
.
EventNotice
's
on EventList
.public EventNotice get(int i)
EventNotice
on this
EventList
.
i
- the index into this EventList
EventNotice
on this
EventList
.public EventNotice threadNextEvent(RealtimeThread thread)
EventNotice
on this
EventList
referring to the given
RealTimeThread
.
thread
- the given RealTimeThread
EventNotice
on the EventList
referring to the given thread. Return
null
if there is no such
EventNotice
.public boolean scheduled(RealtimeThread thread)
RealTimeThread
is currently scheduled, i.e., has an
EventNotice
on this
EventList
.
thread
- the given RealTimeThread
RealTimeThread
is currently scheduled, i.e., has an
EventNotice
.public java.lang.String toString()
EventList
EventList
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |